package Practice10;

public class AnimalTest {
    public static void main(String[] args) {
//        Animal a1 = new Cat();
//        a1.eat();
//        Animal a2 = new Dot();
//        a2.eat();
        Animal a = new Cat();
        Cat c = new Cat();
        Dot d = new Dot();
        showCatEat(c);
        showDogEat(d);

        showAnimalEat(c);
        showAnimalEat(d);
        Cat cc = (Cat) a;

        cc.catchMouse();
    }

    public static void showCatEat(Cat c) {
        c.eat();
    }

    public static void showDogEat(Dot d) {
        d.eat();
    }

    public static void showAnimalEat(Animal a) {
        a.eat();
    }
}
